import React, { Fragment } from "react";
import { PageHeader, Button } from "antd";
import MenuCss from "../index.module.css";

function Component(props) {
  const { changeModalState } = props;
  /* 修改弹窗状态 */
  const openFormModal = () => {
    changeModalState();
  };
  return (
    <Fragment>
      <PageHeader
        className={MenuCss.menu_page_header}
        onBack={() => window.history.back()}
        title="资源列表"
        extra={[
          <Button key="3" type="primary" onClick={openFormModal}>
            新建
          </Button>,
          <Button key="2" type="primary">
            删除
          </Button>,
        ]}
      ></PageHeader>
    </Fragment>
  );
}
const MenuHeader = React.memo(Component);
export default MenuHeader;
